package com.boot.project.module.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.boot.project.core.model.system.entity.Role;
import com.boot.project.core.model.system.entity.RoleResource;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @description:
 * @author: tsing
 * @create: 2021-01-21 22:19
 */
public interface RoleMapper extends BaseMapper<Role> {

    /**
     * 根据角色名称查询角色信息
     * @param roleName 角色名称
     * @return
     */
    @Select("select id, role_name from sys_role where role_name = #{roleName} and deleted = 0")
    Role findByRoleName(@Param("roleName") String roleName);
}
